const request = require('../utils/request.js').request;
export function getSwiper() {
    return request('get', '/appCarousels')
}
export function getHotGoods() {
    return request('get', '/hotGoodList')
}
export function getNewGoods() {
    return request('get', '/newGoodList')
}
export function getCategories() {
    return request('get', '/getCategories')
}
export function getGoodList(data) {
    return request('get', '/commonGoodList', data)
}
export function getAppCategories() {
    return request('get', '/getAppCategories')
}
export function carouseGoodsList(data) {
    return request('get', '/carouseGoodsList', data)
}
export function getDetail(id) {
    return request('get', '/goods/detail/' + id,)
}
export function getDetailNo(id) {
    return request('get', '/goods/detailNoToken/' + id,)
}
export function goodsForRec(id) {
    return request('get', '/goodsForRecharge/detail/' + id,)
}
export function getAddressList(data) {
    return request('get', '/address', data)
}
export function postAddress(data) {
    return request('post', '/addressAdd', data)
}
export function uploadAddress(data) {
    return request('post', '/addressUpdate', data)
}
export function getAddress(addressId) {
    return request('get', '/getAddress/' + addressId)
}
export function delAddress(addressId) {
    return request('get', '/addressRemove/' + addressId)
}
export function getPlaceLists(data) {
    return request('get', '/getPlaceList', data)
}
export function addCart(data) {
    return request('post', '/shop-cart', data)
}
export function uploadCart(data) {
    return request('post', '/updateShopCart', data)
}
export function getCart() {
    return request('get', '/shop-cart/page')
}
export function delCart(cartItemId) {
    return request('get', '/removeShopCart/' + cartItemId)
}
export function postOrder(data) {
    return request('post', '/saveOrder', data)
}
export function toPay(data) {
    return request('post', '/pay/doPay ', data)
}
export function getOrderInfo(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getOrderList(data) {
    return request('get', '/order', data)
}
export function getOrderDetail(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getRecharge(data, token) {
    return request('get', '/getRecharge', data, token)
}
export function addCoupon(data) {
    return request('post', '/pet/cup', data)
}
export function putCoupon(data) {
    return request('put', '/pet/cup', data)
}
export function delCoupon(id) {
    return request('delete', '/pet/cup/' + id)
}
export function reCoupon(id) {
    return request('get', '/pet/cup/' + id)
}
export function getCouponlist(data) {
    return request('get', '/pet/cup/list', data)
}
export function cancelOrder(orderNo) {
    return request('put', `/order/${orderNo}/cancel`)
}
export function finishOrder(orderNo) {
    return request('put', `/order/${orderNo}/finish`)
}
export function removeOrder(id) {
    return request('get', `/removeOrderById/${id}`)
}
export function getCoupon(data) {
    return request('get', `/couponUserRec`, data)
}
export function getCouponIndex(data) {
    return request('get', `/couponUserOnIndex/list`, data)
}
export function getCouponPay(orderNo) {
    return request('get', `/selectOrderCanUseCouponsByOrderNo/${orderNo}`)
}
export function getImgCash(data) {
    return request('get', `/getImgCash`, data)
}
export function getActUserInfo(data) {
    return request('get', `/getActUserInfo`, data)
}
export function getActRecharge(data) {
    return request('get', `/getActRecharge`, data)
}
export function getActRechargeInfo(data) {
    return request('get', `/getActRechargeInfo`, data)
}
export function ckGoods(goodsId) {
    return request('get', `/ckGoods/` + goodsId,)
}
export function getGoodsListByUser(data) {
    return request('get', `/getGoodsListByUser`, data)
}
export function getGoodsForRecList(data) {
    return request('get', `/getGoodsForRecList`, data)
}
export function toOrderRec(addressId, goodId, goodRec) {
    return request('get', `/toOrderRec/${addressId}/${goodId}/${goodRec}`)
}
export function addPet(data) {
    return request('post', '/petInfo/add', data)
}
export function getPetList(data) {
    return request('get', `/petInfo/list`, data)
}
export function toFeedBack(data) {
    return request('post', '/toFeedBack', data)
}
export function getPetInfo(id) {
    return request('get', `/petInfo/getById/${id}`)
}
export function updatePet(data) {
    return request('post', '/petInfo/update', data)
}
export function delPet(id) {
    return request('get', '/petInfo/delete/' + id)
}
export function search(data) {
    return request('get', '/search', data)
}
export function changePay(data) {
    return request('get', '/saveOrderBySuccess', data)
}
export function uploadInfo(data) {
    return request('put', '/user/info', data)
}
export function getUserRecharge(data) {
    return request('get', '/getUserInfoByRechargeInfo', data)
}
export function refOrderStatus(data) {
    return request('post', '/refOrderStatus', data)
}
export function payRecharge(data) {
    return request('post', '/pay/payRecharge', data)
}
export function getDeliRefOrderInfoOnApp(orderNo) {
    return request('get', '/getDeliRefOrderInfoOnApp/' + orderNo,)
}
export function refOrder(data) {
    return request('get', '/refOrder', data)
}
export function choseCoupon(couponId) {
    return request('get', '/choseCoupon/' + couponId,)
}
export function getActInfo() {
    return request('get', '/getActInfo',)
}
export function getBank() {
    return request('get', '/bank/list',)
}
export function postBank(data) {
    return request('post', '/bank/add', data)
}
export function editBank(data) {
    return request('post', '/bank/edit', data)
}
export function subTknum(refOrderNo, tkNum) {
    return request('get', `/updateTkNumOrderStatus/${refOrderNo}/${tkNum}`,)
}
export function defaultAddr() {
    return request('get', `/address/default`,)
}
export function saveOrderOnCk(data) {
    return request('post', '/saveOrderOnCk', data)
}
export function getTaoBaoqQRCodeONApp(data) {
    return request('post', '/getTaoBaoqQRCodeONApp', data)
}
export function usersRoleList(data) {
    return request('get', `/usersRoleList`, data)
}
export function listByUser(data) {
    return request('get', `/listByUser`, data)
}
export function setRole(userPhone, userNo, remark) {
    return request('get', `/setUserRespOnApp/${userPhone}/${userNo}/${remark}`)
}
export function deleteUser(userId) {
    return request('get', `/deleteUserRespOnApp/` + userId)
}
export function getActiveCoupon() {
    return request('get', `/couponUserOnIndexOnActive/list`)
}
export function getWaybillToken(orderId) {
    return request('get', `/getWaybillToken/` + orderId)
}
export function selectStoreQuery(token) {
    return request('get', `/selectStoreQuery/` + token)
}
export function getBrandList() {
    return request('get', `/getBrandListMap`)
}
//商户端接口
export function login(data) {
    return request('post', '/wxLoginOnUser', data)
}
export function getInfo(data, token) {
    return request('get', '/getInfo', data, token)
}
export function getStoreInfo(storeNo) {
    return request('get', '/pet/ebbasic/getStoreByStoreNo/' + storeNo)
}
export function register(data) {
    return request('post', '/wxRegisterOnUser', data)
}
export function addStore(data) {
    return request('post', '/pet/ebbasic', data)
}
export function editStore(data) {
    return request('put', '/pet/ebbasic', data)
}
export function prodList(data) {
    return request('get', '/pet/prodInfo/list', data)
}
export function addGoods(data) {
    return request('post', '/pet/prodInfo', data)
}
export function getGoodsDetail(id) {
    return request('get', '/pet/prodInfo/' + id)
}
export function updateGoods(data) {
    return request('put', '/pet/prodInfo', data)
}
export function getClass() {
    return request('get', '/pet/class/category')
}
export function addClass(data) {
    return request('post', '/pet/class/add', data)
}
export function updateClass(data) {
    return request('put', '/pet/class', data)
}
export function delClass(id) {
    return request('get', '/pet/class/delete/' + id)
}
export function getCartList(data) {
    return request('get', '/pet/order/list', data)
}
export function getDayCartList(data) {
    return request('get', '/pet/order/getAllDayList', data)
}
export function setDown(id) {
    return request('get', '/pet/prodInfo/setProdDown/' + id)
}
export function getCity() {
    return request('post', '/buiness/entplace/getplaceList')
}
export function getNewList(data) {
    return request('get', '/pet/order/getNewList', data)
}
export function searchPhone(phone) {
    return request('get', '/pet/ebbasic/selectUserByPhone/' + phone)
}
export function phoneList(storeNo) {
    return request('get', '/pet/ebbasic/getUserList/' + storeNo)
}
export function bindUnBind(storeNo, phone) {
    return request('get', '/pet/ebbasic/makeUserSetStore/' + storeNo + '/' + phone)
}
export function toArrive(data) {
    return request('post', '/pet/order/returnPayOrder', data)
}
export function getQrcode(data) {
    return request('post', '/pet/ebbasic/getTaoBaoqQRCodeONApp', data)
}
export function getStatistic(data) {
    return request('post', '/pet/statistic/getMap', data)
}
export function delGoods(id) {
    return request('delete', '/pet/prodInfo/' + id,)
}
export function onPrint(storeNo) {
    return request('get', '/pet/order/pushOrderByWebSocket/' + storeNo)
}
export function getCodeList(data) {
    return request('get', '/pet/table/list', data)
}
export function addCode(data) {
    return request('post', '/pet/table', data)
}
export function delCode(id) {
    return request('delete', '/pet/table/' + id,)
}
export function isAgree(refOrderNo) {
    return request('get', '/pay/refund/' + refOrderNo)
}
export function isRefund(refOrderNo) {
    return request('get', '/pet/order/reOutOrder/' + refOrderNo)
}
export function setColProd(id) {
    return request('get', '/pet/prodInfo/setColProd/' + id,)
}
export function classToTop(id, ids) {
    return request('get', '/pet/class/updateClassOrder/' + id + '/' + ids,)
}